<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:font-size="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>打印合格证</title>
    <meta name="keywords" content="打印合格证">
    <meta name="description" content="打印合格证">
    <!--<link rel="stylesheet" href="print.css">-->
    <script language="javascript" src="jquery-2.0.3.min.js.js"></script>
    <script language="javascript" src="WarnPrint5.js" async></script>
    <script language="javascript" src="template.js"></script>
    <script language="javascript" type="text/javascript">
    var data;
    function showjson() {
        //如需传参
        var jsn = window.MyBrowserAPI.getLocationData();
        data = JSON.parse(jsn);
        console.log("======================"+data.length);
        var argObj = {};
        loadJs(data[0].headDetail.hostUrl, callMyFun, argObj);
    }



    function loadJs(loadUrl, callMyFun, argObj) {
        var loadScript = document.createElement('script');
        loadScript.setAttribute("type", "text/javascript");
        loadScript.setAttribute('src', loadUrl);
        console.log(loadUrl)
        document.getElementsByTagName("head")[0].appendChild(loadScript);
        //判断服务器
        if (navigator.userAgent.indexOf("IE") >= 0) {
            //IE下的事件
            loadScript.onreadystatechange = function () {
                if (loadScript.readyState == "loaded" || loadScript.readyState == "complete") {
                    //表示加载成功
                    loadScript.onreadystatechange = null;
                    debugger;
                    callMyFun()//执行回调
                }
            }
        }
        else {
            debugger;
            loadScript.onload = function () {
                loadScript.onload = null;
                debugger;
                callMyFun();
            }
        }
        console.log(argObj);
    }

    function callMyFun() {
        setTimeout(function () {
            WarnPrint(data)
        }, 200);
    }



</script>
</head>
<body onload="load()">
<!--<input type="button" value="" onclick="showjson()" type="hidden" style="width:20%;height:auto"><br><br></font></p>-->
<input type="text" readonly="true" value="请稍等或返回上个页面等待打印结果"   style="width:50%;height:auto"><br><br></font></p>





</body>
</html>